function foo(){
    var myName='袁静'
    let test1=1
    let test2=2
    var innerBar = {
        getName: function(){
            console.log(test1);
            return myName
        },
        setNAme:function(newName){
          myName=newName
        }
    }
    return innerBar
}

var bar = foo()
bar.setNAme('谢焕俊')
bar.getName()//1
console.log(bar.getName());//1 谢焕俊